/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 26727
 * Date: 2024-04-08
 * Time: 10:00
 */
import java.util.*;
public class Test2 {
    //输入h5e6
    //输出hhhhheeeeee
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        char[] ch = sc.next().toCharArray();
        StringBuilder str = new StringBuilder();
        for(int i = 0; i < ch.length; i++) {
            if (ch[i] >= '1' && ch[i] <= '9') {
                int k = ch[i]-'0';
                for(int j = 0; j < k; j++) {
                    str.append(ch[i-1]);
                }
            }else {
                str.append(ch[i]);
            }
        }
        System.out.println(str);
    }
}
